package com.foreverwin.jzymes.job;

import com.foreverwin.jzymes.archive.ArchiveDataService;
import com.foreverwin.jzymes.framework.quartz.domain.SysJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ArchiveService {

    private Logger logger = LoggerFactory.getLogger( ArchiveService.class );

    @Autowired
    ArchiveDataService archiveDataService;

    public void archiveData( SysJob job ){
        logger.info( "归档任务开始" );
        archiveDataService.archiveData( job.getSite() );
        logger.info( "归档任务结束" );
    }
}
